Optimal. Leaf size=258 \[ -\frac {i (a-i b)^{3/2} \sqrt {c-i d} \tanh ^{-1}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {i (a+i b)^{3/2} \sqrt {c+i d} \tanh ^{-1}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {\sqrt {b} (b c+3 a d) \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {d} f}+\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.64, antiderivative size = 258, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {3651, 3736,
6857, 65, 223, 212, 95, 214} \begin {gather*} \frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f}-\frac {i (a-i b)^{3/2} \sqrt {c-i d} \tanh ^{-1}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {i (a+i b)^{3/2} \sqrt {c+i d} \tanh ^{-1}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {\sqrt {b} (3 a d+b c) \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {d} f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 95
Rule 212
Rule 214
Rule 223
Rule 3651
Rule 3736
Rule 6857
Rubi steps
\begin {align*} \int (a+b \tan (e+f x))^{3/2} \sqrt {c+d \tan (e+f x)} \, dx &=\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f}+\int \frac {\frac {1}{2} \left (2 a^2 c-b (b c+a d)\right )+\left (2 a b c+a^2 d-b^2 d\right ) \tan (e+f x)+\frac {1}{2} b (b c+3 a d) \tan ^2(e+f x)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx\\ &=\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f}+\frac {\text {Subst}\left (\int \frac {\frac {1}{2} \left (2 a^2 c-b (b c+a d)\right )+\left (2 a b c+a^2 d-b^2 d\right ) x+\frac {1}{2} b (b c+3 a d) x^2}{\sqrt {a+b x} \sqrt {c+d x} \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f}+\frac {\text {Subst}\left (\int \left (\frac {b (b c+3 a d)}{2 \sqrt {a+b x} \sqrt {c+d x}}+\frac {a^2 c-b^2 c-2 a b d+\left (2 a b c+a^2 d-b^2 d\right ) x}{\sqrt {a+b x} \sqrt {c+d x} \left (1+x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f}+\frac {\text {Subst}\left (\int \frac {a^2 c-b^2 c-2 a b d+\left (2 a b c+a^2 d-b^2 d\right ) x}{\sqrt {a+b x} \sqrt {c+d x} \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}+\frac {(b (b c+3 a d)) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x} \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f}+\frac {\text {Subst}\left (\int \left (\frac {-2 a b c-a^2 d+b^2 d+i \left (a^2 c-b^2 c-2 a b d\right )}{2 (i-x) \sqrt {a+b x} \sqrt {c+d x}}+\frac {2 a b c+a^2 d-b^2 d+i \left (a^2 c-b^2 c-2 a b d\right )}{2 (i+x) \sqrt {a+b x} \sqrt {c+d x}}\right ) \, dx,x,\tan (e+f x)\right )}{f}+\frac {(b c+3 a d) \text {Subst}\left (\int \frac {1}{\sqrt {c-\frac {a d}{b}+\frac {d x^2}{b}}} \, dx,x,\sqrt {a+b \tan (e+f x)}\right )}{f}\\ &=\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f}+\frac {\left ((a+i b)^2 (i c-d)\right ) \text {Subst}\left (\int \frac {1}{(i-x) \sqrt {a+b x} \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{2 f}+\frac {\left ((a-i b)^2 (i c+d)\right ) \text {Subst}\left (\int \frac {1}{(i+x) \sqrt {a+b x} \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{2 f}+\frac {(b c+3 a d) \text {Subst}\left (\int \frac {1}{1-\frac {d x^2}{b}} \, dx,x,\frac {\sqrt {a+b \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}}\right )}{f}\\ &=\frac {\sqrt {b} (b c+3 a d) \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {d} f}+\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f}+\frac {\left ((a+i b)^2 (i c-d)\right ) \text {Subst}\left (\int \frac {1}{a+i b-(c+i d) x^2} \, dx,x,\frac {\sqrt {a+b \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {\left ((a-i b)^2 (i c+d)\right ) \text {Subst}\left (\int \frac {1}{-a+i b-(-c+i d) x^2} \, dx,x,\frac {\sqrt {a+b \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}}\right )}{f}\\ &=-\frac {i (a-i b)^{3/2} \sqrt {c-i d} \tanh ^{-1}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {i (a+i b)^{3/2} \sqrt {c+i d} \tanh ^{-1}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {\sqrt {b} (b c+3 a d) \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {d} f}+\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(1518\) vs. \(2(258)=516\).
time = 6.12, size = 1518, normalized size = 5.88 \begin {gather*} -\frac {i (-a-i b) \left (-\left ((-a-i b) \left (-\frac {2 (-c-i d) \tanh ^{-1}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a+i b} \sqrt {c+i d}}-\frac {2 \sqrt {d} \sqrt {b c-a d} \sqrt {\frac {b}{\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}}} \sqrt {\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}} \sinh ^{-1}\left (\frac {\sqrt {b} \sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b c-a d} \sqrt {\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}}}\right ) \sqrt {\frac {b (c+d \tan (e+f x))}{b c-a d}}}{b^{3/2} \sqrt {c+d \tan (e+f x)}}\right )\right )-\frac {2 \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (1+\frac {b d (a+b \tan (e+f x))}{(b c-a d) \left (\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}\right )}\right )^{3/2} \left (\frac {\sqrt {b c-a d} \sqrt {\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}} \sinh ^{-1}\left (\frac {\sqrt {b} \sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b c-a d} \sqrt {\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}}}\right )}{2 \sqrt {b} \sqrt {d} \sqrt {a+b \tan (e+f x)} \left (1+\frac {b d (a+b \tan (e+f x))}{(b c-a d) \left (\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}\right )}\right )^{3/2}}+\frac {1}{2 \left (1+\frac {b d (a+b \tan (e+f x))}{(b c-a d) \left (\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}\right )}\right )}\right )}{\sqrt {\frac {b}{\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}}} \sqrt {\frac {b (c+d \tan (e+f x))}{b c-a d}}}\right )}{2 f}-\frac {i (-a+i b) \left (-\left ((-a+i b) \left (-\frac {2 \sqrt {-c+i d} \tanh ^{-1}\left (\frac {\sqrt {-c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {-a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {-a+i b}}+\frac {2 \sqrt {d} \sqrt {b c-a d} \sqrt {\frac {b}{\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}}} \sqrt {\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}} \sinh ^{-1}\left (\frac {\sqrt {b} \sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b c-a d} \sqrt {\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}}}\right ) \sqrt {\frac {b (c+d \tan (e+f x))}{b c-a d}}}{b^{3/2} \sqrt {c+d \tan (e+f x)}}\right )\right )+\frac {2 \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (1+\frac {b d (a+b \tan (e+f x))}{(b c-a d) \left (\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}\right )}\right )^{3/2} \left (\frac {\sqrt {b c-a d} \sqrt {\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}} \sinh ^{-1}\left (\frac {\sqrt {b} \sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b c-a d} \sqrt {\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}}}\right )}{2 \sqrt {b} \sqrt {d} \sqrt {a+b \tan (e+f x)} \left (1+\frac {b d (a+b \tan (e+f x))}{(b c-a d) \left (\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}\right )}\right )^{3/2}}+\frac {1}{2 \left (1+\frac {b d (a+b \tan (e+f x))}{(b c-a d) \left (\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}\right )}\right )}\right )}{\sqrt {\frac {b}{\frac {b^2 c}{b c-a d}-\frac {a b d}{b c-a d}}} \sqrt {\frac {b (c+d \tan (e+f x))}{b c-a d}}}\right )}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 180.00, size = 0, normalized size = 0.00 \[\int \sqrt {c +d \tan \left (f x +e \right )}\, \left (a +b \tan \left (f x +e \right )\right )^{\frac {3}{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (e + f x \right )}\right )^{\frac {3}{2}} \sqrt {c + d \tan {\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________